package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.entity.player.UserCharitable;
import com.yanqu.road.entity.player.UserCharitablePosition;
import com.yanqu.road.entity.player.UserCharitableSkill;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Map;

/**
 * @Author wpj
 * @Date 2020/9/1
 */
public class UserCharitableBusiness {
    public static UserCharitable getUserCharitable(long userId) {
        return DaoHelper.getUserCharitableDaoImpl().getUserCharitable(userId);
    }

    public static boolean addUserCharitable(UserCharitable userCharitable) {
        return DaoHelper.getUserCharitableDaoImpl().add(userCharitable);
    }

    public static boolean updateUserCharitable(UserCharitable userCharitable) {
        return DaoHelper.getUserCharitableDaoImpl().update(userCharitable);
    }

    public static Map<Integer, UserCharitablePosition> getUserCharitablePositionMap(long userId) {
        return DaoHelper.getUserCharitablePositionDaoImpl().getUserCharitablePositionMap(userId);
    }

    public static boolean addUserCharitablePosition(UserCharitablePosition userCharitablePosition) {
        return DaoHelper.getUserCharitablePositionDaoImpl().add(userCharitablePosition);
    }

    public static boolean updateUserCharitablePosition(UserCharitablePosition userCharitablePosition) {
        return DaoHelper.getUserCharitablePositionDaoImpl().update(userCharitablePosition);
    }

    public static Map<Integer, Map<Integer, UserCharitableSkill>> getUserCharitableSkillMap(long userId) {
        return DaoHelper.getUserCharitableSkillDaoImpl().getUserCharitableSkillMap(userId);
    }

    public static boolean addUserCharitableSkill(UserCharitableSkill userCharitableSkill) {
        return DaoHelper.getUserCharitableSkillDaoImpl().add(userCharitableSkill);
    }

    public static boolean updateUserCharitableSkill(UserCharitableSkill userCharitableSkill) {
        return DaoHelper.getUserCharitableSkillDaoImpl().update(userCharitableSkill);
    }


}
